/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.caelum.jdbc.teste;

import br.com.caelum.jdbc.dao.ContatoDAO;
import br.com.caelum.jdbc.modelo.Contato;
import java.sql.SQLException;
import java.util.Calendar;

/**
 *
 * @author Igor
 */
public class TestaInsere {
    public static void main(String[] args) throws SQLException{
        Contato contato = new Contato();
        contato.setNome("Luciano");
        contato.setEmail("luciano@gmail.com");
        contato.setEndereco("Consul vilates fragoso apt 301");
        contato.setDataNascimento(Calendar.getInstance());
        
        ContatoDAO cd = new ContatoDAO();
        
        cd.adiciona(contato);
        
        System.out.println("Gravado com sucesso");
        
    }
}
